/* 
 * File:   I2c.h
 * Author: Julian Sanin
 *
 * Created on 23/02/2014, 16:53
 */

#ifndef I2C_H
#define	I2C_H

#ifdef	__cplusplus
extern "C" {
#endif

#include "PeripheralModule.h"

enum I2cMode {
    I2C_MASTER,
    I2C_SLAVE
};

CLASS_EXTEND(I2c, PeripheralModule)
    /* No member needed. */
OVERRIDE(I2c, PeripheralModule)
    void (*dtor)(I2c *);
METHODS
    void I2c_ctor(I2c *obj, int module, enum I2cMode mode);
    void I2c_dtor(I2c *obj);
    void I2c_setAddress(I2c *obj, int i2cAddress);
CLASS_END

#ifdef	__cplusplus
}
#endif

#endif	/* I2C_H */
